<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=640px,user-scalable=no,target-densitydpi=device-dpi" />
		<link rel="stylesheet" href="../css/css.css" type="text/css" />
		<script type="text/javascript" src='../js/jquery.min.js'></script>
		<script type="text/javascript" src='../js/main_in.js'></script>
		<script type="text/javascript" src='../js/common.js'></script>
		<title>注册</title>
		<script type="text/javascript">
			var pcount = '';
			var url_1 = '';
			var url_2 = '';
			var cpid = '';
			var cpname = '';
			var ndid = '';
			var ndname = '';
			var uid = '';
			var username = '';
			$(function(){
//				if ($.cookie("captcha")) {
//                  var count = $.cookie("captcha");
//                  var btn = $('#get_yzb');
//                  btn.val(count + '秒后可重新获取').attr('disabled', true).css('cursor', 'not-allowed');
//                  var resend = setInterval(function() {
//                      count--;
//                      if (count > 0) {
//                          btn.val(count + '秒后可重新获取').attr('disabled', true).css('cursor', 'not-allowed');
//                          $.cookie("captcha", count, {path: '/', expires: (1 / 86400) * count});
//                      } else {
//                          clearInterval(resend);
//                          btn.val("获取验证码").removeClass('disabled').removeAttr('disabled style');
//                      }
//                  }, 1000);
//              }

                $('#get_yzb').click(function() {
                    var phone_v = checkPhone();
                    if (phone_v == 1) {
                    	plus.nativeUI.alert('请输入正确的手机号',function(){
									
						},'注册');
                    }
                    var phone_val = $("#acc_LoginName").val();
                    if (phone_val == '') {
                    	plus.nativeUI.alert('请输入正确的手机号',function(){
									
						},'注册');
                        return false;
                    }

                    var d = new Date();
                    var time = '';
                    time += d.getFullYear() + '-';
                    time += d.getMonth() + 1 + '-';
                    time += d.getDate();
                    $.ajax({
                        url: "http://api.unair.cn/api/SmsSendBL2",
                        type: "POST",
                        data: {
                            "MobileNumber": phone_val,
                            "SendDate": time,
                        },
                        success: function(data) {
                            if (data < 5) {
                                do_yzb(phone_val, time);
                            } else {
                                plus.nativeUI.alert('该手机号今天发送验证码次数超限,请明天再试',function(){
									
								},'注册');
                            }
                        },
                        error: function(data) {
//                                alert(data);
                        }

                    });


                });
                
                $(".do_add").click(function() {
                    var qr_code = $("#qr_code").val();
                    
                    if(qr_code != ''){
                            $.ajax({
                                url: "http://api.unair.cn/api/PagingQuery",
                                type: "POST",
                                data: {
                                    "TableName" : "Users",
                                    "PKName" : "ID",
                                    "where" : "ID=" + qr_code
                                },
                                success: function(data) {
//                              	alert(JSON.stringify(data['TotalItems']))
                                	
                                	
                                    if (data['TotalItems'] > 0) {
                                    	var data = eval("(" + data.ResTable + ")")
//                                  	alert(JSON.stringify(data[0]['CPID']))
                                    	cpid = data[0]['CPID'];
	                                	cpname = data[0]['CPName'];
	                                	ndid = data[0]['NDID'];
	                                	ndname = data[0]['NDName'];
	                                	uid = data[0]['ID'];
	                                	username = data[0]['LoginName'];
                                        doadd(qr_code)
                                    }else{
                                        plus.nativeUI.alert('推荐码错误！',function(){},'注册');
                                    }
                                },
                                error: function(data) {
                                    plus.nativeUI.alert('推荐码错误！！！',function(){},'注册');
                                }
                            });
                    }else{
                        plus.nativeUI.alert('推荐码不能为空',function(){
								return false;	
						},'注册');
                        
                    }
                    
                    
                })
                
			});
			
			
			function doadd(){
				var qr_code = $("#qr_code").val();
                    if(qr_code == ''){
                        qr_code = 0
                    }
				var name = $("#acc_Name").val();
                    var LoginName = $("#acc_LoginName").val();
                    var Password = $("#acc_Password").val();
                    var Passworddd = $("#acc_Passworddd").val();
                    var Type = 5;
                    var acc_name = $("#acc_name").val();
                    var number = $("#number").val();
                    var number_val = $("#number_val").val();
                    if (number_val == '') {
                        plus.nativeUI.alert('验证码不能为空',function(){},'注册');
                        return false;
                    }
                    if (number != number_val) {
                        plus.nativeUI.alert('验证码不正确',function(){},'注册');
                        return false;
                    }

                    if (!(/^1[34578]\d{9}$/.test(LoginName))) {
                        plus.nativeUI.alert('手机号码有误，请重填',function(){},'注册');
                        return false;
                    }

                    if (Password == '' || LoginName == '') {
                        plus.nativeUI.alert('用户名密码不能为空',function(){},'注册');
                        return false;
                    }

                    if (Password != Passworddd) {
                        plus.nativeUI.alert('密码不一致',function(){},'注册');
                        return false;
                    }
                    var passlength = Password.length;
                    if (passlength < 6 || passlength > 16) {
                        plus.nativeUI.alert('密码必须大于6位小于16位',function(){},'注册');
                        return false;
                    }
                    if (name == '') {
                        plus.nativeUI.alert('姓名不能为空',function(){},'注册');
                        return false;
                    }
                    var body = {
                        "Token": "22e8f734-dae9-494e-a743-4c4a64af4ce2",
                        "Users": {"id": uid, "username": username, "cpid": cpid, "cpname": cpname, "ndid": ndid, "ndname": ndname, "cmid": ""},
                        "UserToManage": {"Name": name, "NDID": ndid, "CPID": cpid, "LoginName": LoginName, "Password": Password, "Mobile": LoginName, "Remark": "", "Type": "5", "CMID": "", "LoginType": 3},
                        "Roles": [{"ROID": "12"}],
                        "RecommendBy": qr_code
                    }

                    if (confirm("确认提交？")) {
                    	var wt=plus.nativeUI.showWaiting();
                        if ($("#dr").is(':checked')) {
                            if (url_1 == '') {
                            	plus.nativeUI.alert('请上传本人肩部以上真实头像图片',function(){
                            		wt.close();
                            	},'注册');
                                return false;
                            }
                            if (url_2 == '') {
                            	plus.nativeUI.alert('请上传本人含头像部分驾驶证照片',function(){
                            		wt.close();
                            	},'注册');
                                return false;
                            }
//                          if ($(".start").eq(0).val() == '') {
//                          	plus.nativeUI.alert('至少填写第一条线路的完整信息',function(){},'注册');
//                              return false;
//                          }
//                          if ($(".end").eq(0).val() == '') {
//                          	plus.nativeUI.alert('至少填写第一条线路的完整信息',function(){},'注册');
//                              return false;
//                          }
                            var start = new Array();
                            var end = new Array();
                            var money = new Array();
//                          $(".start").each(function(k) {
//                              if ($(".start").eq(k).val() != '') {
//                                  start[k] = $(".start").eq(k).val();
//                              }
//                          });
//                          $(".end").each(function(k) {
//                              if ($(".end").eq(k).val() != '') {
//                                  end[k] = $(".end").eq(k).val();
//                              }
//                          });
                            var cyear = $("#cyear").val();
                            var idcard = $("#idcard").val();
                            var cleng = $("#cleng").val();
                            var cweight = $("#cweight").val();
                            var cpp = $("#cpp").val();
                            var ctype = $("#ctype").val();
                            var caryear = $("#caryear").val();
                            var carnumber = $("#carnumber").val();
                            var dengji = $("#dengji").val();
                            var hope = $("#hope").val();
                            
                            var head = '';
                            
                            var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
                            if (reg.test(idcard) === false)
                            {
                                plus.nativeUI.alert('身份证输入不合法',function(){},'注册');
                                wt.close();
                                return  false;
                            }
                            $.ajax({
                                url: "http://insure.unair.cn/die_h.php",
                                type: "POST",
                                data: {"name": name, "LoginName": LoginName, "Password": Password, "start": start, "end": end, "money": money,
                                    "cyear": cyear, "idcard": idcard, "cleng": cleng, "cweight": cweight, "cpp": cpp, "caryear": caryear, "head": head, 
                                    "head1": url_1, "head2": url_1, "ctype": ctype, "carnumber": carnumber, "RecommendBy": 0, "hope": hope, "dengji": dengji,
                                    "cpid":cpid,"cpname":cpname,"uid":uid,"username":username,"ndid":ndid,"ndname":ndname
                                },
                                success: function(data) {
                                    if (data == 'Success') {
                                    	plus.nativeUI.alert('提交成功',function(){
                                    		wt.close();
											clicked('../index.html')
										},'注册');
                                    } else {
                                    	plus.nativeUI.alert('用户名已被占用',function(){
											wt.close();
										},'注册');
                                    }
                                },
                                error: function(data) {
                                    alert(data);
                                    wt.close();
                                }
                            });
                        } else {
                            if (!$("#du").is(':checked')) {
                                plus.nativeUI.alert('请勾选用户类型！',function(){
                                   wt.close();
								},'注册');
                                return false;
                            }
                            $.ajax({
                                url: "http://api.unair.cn/api/iUserRegistrationCL",
                                type: "POST",
                                data: body,
                                success: function(data) {

                                    if (data.message == 'Success') {
                                        plus.nativeUI.alert('提交成功！',function(){
                                        	wt.close();
                                        	clicked('../index.html')
										},'注册');
                                        
                                    } else {
                                        plus.nativeUI.alert('用户名已被占用',function(){
											wt.close();
										},'注册');
                                        
                                    }
                                    wt.close();
                                },
                                error: function(data) {
                                    alert(data);
                                    wt.close();
                                }

                            });
                        }
                            
                    };
//              })
			}
			
			function do_yzb(phone_val, time) {
                var count = 60;
                var resend = setInterval(function() {
                    count--;
                    if (count > 0) {
                        $("#get_yzb").html(count + "秒后可重新获取");
                        $.cookie("captcha", count, {path: '/', expires: (1 / 86400) * count});
                    } else {
                        clearInterval(resend);
                        $("#get_yzb").html("获取验证码").removeAttr('disabled style');
                    }
                }, 1000);
                $("#get_yzb").attr('disabled', true).css('cursor', 'not-allowed');
                /////////////////////

                var number = '';
                for (var i = 0; i < 6; i++) {
                    number += Math.floor(Math.random() * 10);
                }
                $("#number").val(number);
                $.ajax({
                    url: "https://sdkhttp.gzdlinfo.cn:8443/sdkproxy/sendsms.action",
//                            type: "POST",
                    dataType: 'jsonp',
//                            crossDomain: true,
                    data: {
                        "cdkey": 'GZDL-C2100JCRNP',
                        "password": 747669,
                        "phone": phone_val,
                        "message": "【乾龙快运】您好，您的验证码为" + number,
                        "seqid": 057487430660,
                        "smspriority": 1,
                    },
                    success: function(data) {
//                                alert(data)
                    },
                    error: function(data) {
//                                alert(data);
                    }

                });
//                    ///////////////
                $.ajax({
                    url: "http://api.unair.cn/api/SmsSendBL2",
                    type: "Put",
                    data: {
                        "MobileNumber": phone_val,
                        "Sms": "【乾龙快运】您好，您的验证码为" + number,
                        "CreateOn": time,
                        "SmsState": 13,
                    },
                    success: function(data) {
//                                aert(data)
                    },
                    error: function(data) {
//                                alert(data)
                    }

                });
            }
			
			function checkPhone() {
                var phone = document.getElementById('acc_LoginName').value;
                if (!(/^1[34578]\d{9}$/.test(phone))) {
                	plus.nativeUI.alert('请输入正确的手机号',function(){
									
					},'注册');
                }
            }
			$(function() {
                $("#dr").click(function() {
                    if ($(this).is(':checked')) {
//                      alert(1);
                        $("#xia1").show();
                        $(".do_add").hide();
                        $(".per1").show();
                        $("#du").attr("checked", false);
                    } else {
//                      alert(2);
                        $("#xia1").hide();
                        $(".do_add").show();
                        $(".per1").hide();
                        $("#toadd").hide();
                    }
                });
                $("#headimg").click(function() {
                    $("#uploadFile").click();
                });
                $('#uploadFile').change(function() {
                    $("#myupload").ajaxSubmit({
                        success: function(data) {
                            var img = '<img src="' + data + '" style="width:200px;height:150px;"/>';
                            $("#headimg").html(img);
                            head = data;
//                          img[imgid] = data;
                        }
                    });

                });
                $("#headimg1").click(function() {
                    $("#uploadFile1").click();
                });
                $('#uploadFile1').change(function() {
                    $("#myupload1").ajaxSubmit({
                        success: function(data) {

                            var img = '<img src="' + data + '" style="width:200px;height:150px;"/>';
                            $("#headimg1").html(img);
                            head1 = data;
//                          img[imgid] = data;
                        }
                    });

                });
                $("#headimg2").click(function() {
                    $("#uploadFile2").click();
                });
                $('#uploadFile2').change(function() {
                    $("#myupload2").ajaxSubmit({
                        success: function(data) {

                            var img = '<img src="' + data + '" style="width:200px;height:150px;"/>';
                            $("#headimg2").html(img);
                            head2 = data;
//                          img[imgid] = data;
                        }
                    });

                });
                $("#xia1").click(function() {
                    var number = $("#number").val();
                    var number_val = $("#number_val").val();
                    if (number_val == '') {
                    	plus.nativeUI.alert('验证码不能为空',function(){
									
					},'注册');
                        return false;
                    }
                    if (number != number_val) {
                    	plus.nativeUI.alert('验证码不正确',function(){
									
					},'注册');
                        return false;
                    }
					$("#toadd").show();
                    $(".app_body").hide();
                    $("#car_2").show();
                    $(".app_head").hide();
                    $(".pre2").show();
                });
                $(".pr1").click(function() {
                    $(".app_body").hide();
                    $("#car").show();
                    $(".app_head").hide();
                    $(".pre").show();
                });
                $("#xia2").click(function() {
                    $(".app_body").hide();
                    $("#car_2").show();
                    $(".app_head").hide();
                    $(".pre2").show();
                });
                $(".pr2").click(function() {
                    $(".app_body").hide();
                    $("#car").show();
                    $(".app_head").hide();
                    $(".pre").show();
                });
//              $("#xia3").click(function() {
//                  $(".app_body").hide();
//                  $("#car_3").show();
//                  $(".pp3").show();
//                  $("#toadd").show();
//                  $("#shang4s").show()
//                  $(".app_head").hide();
//                  $(".pre3").show();
//                  alert_ok("线路至少一条，至多三条，增加点+，删除点x,始发目地请选择系统联动", "");
//              });
//              $(".pr3").click(function() {
//                  $(".app_body").hide();
//                  $("#car_2").show();
//                  // $(".pp3").show();
//                  $("#shang4s").hide()
//                  $("#toadd").hide();
//                  $(".app_head").hide();
//                  $(".pre2").show();
//
//              });
//              $("#jia").click(function() {
//                  var item = '<div class="app_body pp3 todelete" style="border-radius:40px;position:relative;">' +
//                          '<div class="main_in_input" style="height:70px;">' +
//                          '<div class="main_in_input_text_left x1"  >始发地：</div>' +
//                          '<div class="main_in_input_input_right x1"><input type="text" class="select_city start" id="add_CityName1" value="" /></div>' +
//                          '<input type="hidden" class="select_city_id" name="add_CityID" id="add_CityID" />' +
//                          '</div>' +
//                          '<div class="main_in_input" style="height:70px;">' +
//                          '<div class="main_in_input_text_left x2">目的地：</div>' +
//                          '<div class="main_in_input_input_right x2"><input type="text" class="select_city end" id="add_CityName" value="" /></div>' +
//                          '<input type="hidden" class="select_city_id" name="add_CityID" id="add_CityID" />' +
//                          '</div>' +
//                          '<div style="position:absolute;right:25px;top:1px;font-size:40px;" class="xdelete">×</div>' +
//                          '</div>';
//                  if ($(".start").length < 3) {
//                      $(item).appendTo($("#car_3"));
//                  }
//              });
                $("body").on("click", ".xdelete", function() {
                    var weizhi = $(".xdelete").index($(this));
                    //alert(weizhi);
                    $(".todelete").eq(weizhi).remove();
                });
                $("#du").click(function() {
                    if ($(this).is(':checked')) {
                        $("#dr").attr("checked", false);
                        $("#xia1").hide();
                        $(".do_add").show();
                        $(".per1").hide();
                        $("#toadd").hide();
                    }
                });
                $("#shang2").click(function() {
                    $(".pr1").click();
                });
                $("#shang3").click(function() {
                    $(".pr1").click();
                });
                $("#shang4").click(function() {
                    $(".pr3").click();
                });
            });
            
            
var server="http://insure.unair.cn/upload_h.php";
var files=[];
// 上传文件
function upload(divid){
	if(files.length<=0){
		plus.nativeUI.alert("没有添加上传文件！");
		return;
	}
	var wt=plus.nativeUI.showWaiting();
	var task=plus.uploader.createUpload(server,
		{method:"POST"},
		function(t,status){ //上传完成
			if(status==200){
				plus.storage.setItem("uploader",t.responseText);
				data = eval("(" + t.responseText + ")");
//				alert(JSON.stringify(data))
					$("#" + divid).children().remove();
					
				if(divid == 'headimg1'){
//					alert(JSON.stringify(data))
					url_1 = "http://insure.unair.cn/" + data['files']['uploadkey']['url'];
					var src1 = '<img src="' +url_1+ '" style="width: 200px;height:150px;"/>'
					$("#headimg1").append(src1);
				}
				if(divid == 'headimg2'){
//					alert(JSON.stringify(data))
					url_2 = "http://insure.unair.cn/" + data['files']['uploadkey']['url'];
					var src2 = '<img src="' +url_2+ '" style="width: 200px;height:150px;"/>'
					$("#headimg2").append(src2);
				}
					
					
				wt.close();
		}else{
				wt.close();
			}
		}
	);
	task.addData("client","HelloH5+");
	task.addData("uid",getUid());
	for(var i=0;i<files.length;i++){
		var f=files[i];
		task.addFile(f.path,{key:f.name});
	}
	task.start();
}
		// 拍照添加文件
function appendByCamera(divid){
	plus.camera.getCamera().captureImage(function(p){
		appendFile(p);
		upload(divid);
	});	
}
// 从相册添加文件
function appendByGallery(divid){
	plus.gallery.pick(function(p){
        appendFile(p);
        upload(divid);
    });
}
// 添加文件
var index=1;
function appendFile(p){
	var fe=document.getElementById("files");
	var li=document.createElement("li");
	var n=p.substr(p.lastIndexOf('/')+1);
	li.innerText = n
	fe.appendChild(li);
	files.push({name:"uploadkey",path:p});
	index++;
	empty.style.display="none";
}
// 产生一个随机数
function getUid(){
	return Math.floor(Math.random()*100000000+10000000).toString();
}

		</script>
	</head>
	<body>
		<ul id="files" style="text-align:left;display:none;">
				<p id="empty" style="font-size:12px;color:#C6C6C6;">无上传文件</p>
		</ul>
		<div class="app_head pre">
            <div class="app_prev" onclick="clicked('login.html')"><img src="../img/arrow.png" /></div>
            <div class="app_head_text">注&nbsp;册</div>
            <div class="app_prev"></div>
        </div>
        
        <div class="app_head pre1" style="display:none;" >
            <div class="app_prev pr1"><img src="../img/arrow.png" /></div>
            <div class="app_head_text">司机资料认证</div>
            <div class="app_prev"></div>
        </div>
        <div class="app_head pre2" style="display:none;" >
            <div class="app_prev pr2"><img src="../img/arrow.png" /></div>
            <div class="app_head_text">司机身份认证</div>
            <div class="app_prev"></div>
        </div>
        <!--<div class="app_head pre3" style="position:relative;display:none;">
            <div class="app_prev pr3"><img src="../img/arrow.png" /></div>
            <div class="app_head_text">常跑线路</div>
            <div id="jia" style="font-size:48px;position:absolute;right:5%;">+</div>
            <div class="app_prev"></div>
        </div>-->
        <div style="display:none;">
            <form id='myupload' action='upload.php' method='post' enctype='multipart/form-data'>
                <div>
                    <input type="file" id="uploadFile" name="file" runat="server"/>
                </div>
            </form>
        </div>
        <div style="display:none;">
            <form id='myupload1' action='upload.php' method='post' enctype='multipart/form-data'>
                <div>
                    <input type="file" id="uploadFile1" name="file" runat="server"/>
                </div>
            </form>
        </div>
        <div style="display:none;">
            <form id='myupload2' action='upload.php' method='post' enctype='multipart/form-data'>
                <div>
                    <input type="file" id="uploadFile2" name="file" runat="server"/>
                </div>
            </form>
        </div>
        
        <div class="app_body" id="car">
            <div class="main_in_input">
                <div class="main_in_input_img"><img src="../img/icon.png" /></div>
                <div class="main_in_input_text"><input type="text" id="acc_LoginName" placeholder="请输入手机号" /></div>
                <input type="hidden" id="number" />
            </div>
            <div class="main_in_input">
                <div class="main_in_input_img"><img src="../img/icon_01.png" /></div>
                <div style="width: 50%;" class="main_in_input_text"><input type="text" id="number_val"  placeholder="请输入验证码" /></div>
                <div class="main_in_input_button" id="get_yzb">获取验证码</div>
            </div>
            <div class="main_in_input">
                <div class="main_in_input_img"><img src="../img/icon_02.png" /></div>
                <div class="main_in_input_text"><input type="password" id="acc_Password" placeholder="请输入密码" /></div>
            </div>
            <div class="main_in_input">
                <div class="main_in_input_img"><img src="../img/icon_02.png" /></div>
                <div class="main_in_input_text"><input type="password" id="acc_Passworddd" placeholder="请确认密码" /></div>
            </div>
            <div class="main_in_input">
                <div class="main_in_input_img"><img src="../img/icon_03.png" /></div>
                <div class="main_in_input_text"><input type="text" id="acc_Name" placeholder="请输入姓名" /></div>
            </div>
            <div class="main_in_input">
                <div class="main_in_input_img"></div>
                <div class="main_in_input_text"><input type="text" id="qr_code" value=""  placeholder="请输入推荐码"/></div>
            </div>
            
            <div style="margin-top:40px;">
                <div style="float:left;font-size:14px;padding-left:10%;">
                    <div class="left"><input type="checkbox" id="du" style="width:40px;height:40px;" /></div>
                    <div class="left" style="font-size:35px;">&nbsp;我是货主</div>   
                </div>
                <div style="float:left;padding-left:10%;">
                    <div class="left"><input type="checkbox" id="dr" style="width:40px;height:40px;" /></div>
                    <div class="left" style="font-size:35px;">我是司机</div>
                </div>
            </div>
            <div style="height: 10px;clear: both;"></div>
            <div class="app_submit do_add">提&nbsp;交</div>
            <div class="app_submit" id="xia1" style="display:none;">下一步</div>
        </div>   
            <!----------->
        <div class="app_body" id="car_1" style="display:none;">
            <div class="main_in_input per1" >
                <div class="main_in_input_img"><img src="../img/icon_03.png" /></div>
                <div class="main_in_input_text"><input type="text"  placeholder="请输入驾龄" /></div>
            </div>
            <!--            <div class="main_in_input per1" >
                            <div class="main_in_input_img"><img src="../img/icon_03.png" /></div>
                            <div class="main_in_input_text"><input type="text" id="idcard" placeholder="请确认身份证号码" /></div>
                        </div>-->
            <div class="main_in_input per1"  style="margin-top:15px;height:300px;">
                <div style="margin-left:10%;">请上传驾驶证持有人真实头像照片</div>
                <div style="margin-left:15%;">(肩膀以上五官清晰头像)</div>
                <div id="headimg" style="height:200px;width:200px;border:1px solid black;margin-left:15%;margin-top:30px;">
                    <span style="font-size:130px;margin-left:50px;">+</span>
                </div>
                <div style="height: 10px;clear: both;"></div>
            </div>
            <div style="background:white;height:120px;">
                <div class="app_submit left" id="shang2" style="width:40%;margin-left:5%;">上一步</div>
                <div class="app_submit left" id="xia2" style="width:40%;margin-left:5%;">下一步</div>
            </div>
        </div>
        <!-------###2-------->
        <div class="app_body" id="car_2" style="display:none;">
            <div class="main_in_input" style="height:80px;">
                <div style="float:left;font-size:20px;margin-left:-10px;margin-top:28px;width:120px;text-align:right;">驾龄(年):</div>
                <div style="float:left;font-size:18px;padding-left:5%;margin-top:18px;width:70%;">
                    <input style="width:100%;height:50px;font-size:20px;border:none;" id="caryear" placeholder="请输入驾龄(纯数字)">
                </div>
            </div>
            <div class="main_in_input" style="height:80px;">
                <div style="float:left;font-size:20px;margin-left:-10px;margin-top:28px;width:120px;text-align:right;">身份证号:</div>
                <div style="float:left;font-size:18px;padding-left:5%;margin-top:18px;width:70%;">
                    <input style="width:100%;height:50px;font-size:20px;border:none;" id="idcard" placeholder="请输入身份证号码">
                </div>
            </div>
            <div class="main_in_input" style="height:80px;">
                <div style="float:left;font-size:20px;margin-left:-10px;margin-top:28px;width:120px;text-align:right;">驾驶证等级:</div>
                <div style="float:left;font-size:20px;padding-left:5%;margin-top:14px;width:70%;">
                    <select style="width:100%;height:55px;font-size:20px;" id="dengji">
                        <option >A1</option>
                        <option>A2</option>
                        <option>A3</option>
                        <option>B1</option>
                        <option>B2</option>
                        <option>C1</option>
                        <option>C2</option>
                    </select>
                </div>
            </div>
            <div class="main_in_input" style="height:80px;">
                <div style="float:left;font-size:20px;margin-left:-10px;margin-top:28px;width:120px;text-align:right;">期望月薪:</div>
                <div style="float:left;font-size:20px;padding-left:5%;margin-top:15px;width:70%;">
                    <select style="width:100%;height:55px;font-size:20px;" id="hope">
                        <option >4000-5999</option>
                        <option>6000-7999</option>
                        <option>8000-9999</option>
                        <option>10000-11999</option>
                        <option>12000以上</option>
                    </select>
                </div>
            </div>
            <div class="main_in_input per1"  style="margin-top:15px;height:220px;">
                <div style="margin-left:10%;font-size:18px;">请上传本人肩部以上真实头像照片</div>
                <div onclick="showActionSheet(this)" id="headimg1" style="height:150px;width:200px;border:1px solid black;margin-left:10%;margin-top:10px;">
                    <span style="font-size:105px;margin-left:60px;">+</span>
                </div>
            </div>
            <div class="main_in_input per1"  style="margin-top:15px;height:220px;">
                <div style="margin-left:10%;font-size:20px;">请上传本人驾驶(函头像和基本信息部分)照片</div>
                <div onclick="showActionSheet(this)" id="headimg2" style="height:150px;width:200px;border:1px solid black;margin-left:10%;margin-top:10px;">
                    <span style="font-size:105px;margin-left:60px;">+</span>
                </div>
            </div>

            <div style="background:white;height:120px;">
                <div class="app_submit left" id="shang3" style="width:40%;margin-left:5%;">上一步</div>
                <div class="app_submit left do_add" id="toadd" style="width:40%;margin-left:5%;">提交</div>
                <!--<div class="app_submit left" id="xia3" style="width:40%;margin-left:5%;">下一步</div>-->
            </div>
        </div>
        <!--------------------##2------------------->
        <!--------------------##3------------------->
        <!--<div id="car_3" style="display:none;">
            <div class="app_body pp3" style="border-radius:40px;">
                <div class="main_in_input" style="height:70px;">
                    <div class="main_in_input_text_left x1"  >始发地：</div>
                    <div class="main_in_input_input_right x1"><input type="text" class="select_city start" id="add_CityName1" value="" /></div>
                    <input type="hidden" class="select_city_id" name="add_CityID" id="add_CityID" />
                </div>
                <div class="main_in_input" style="height:70px;">
                    <div class="main_in_input_text_left x2">目的地：</div>
                    <div class="main_in_input_input_right x2"><input type="text" class="select_city end" id="add_CityName" value="" /></div>
                    <input type="hidden" class="select_city_id" name="add_CityID" id="add_CityID" />
                </div>
            </div> 
        </div>-->
        <!--<div style="background:white;height:120px;display:none;margin-top:20px;" id="shang4s">
            <div class="app_submit left" id="shang4" style="width:40%;margin-left:5%;">上一步</div>
            <div class="app_submit left do_add" id="toadd" style="width:40%;margin-left:5%;">提交</div>
        </div>-->
            
        </div>
        <div class="outside_pull"></div>
        <img src="../img/loading.gif" class="fade_out_img" id="fade_out_loading" />
	</body>
	<script type="text/javascript" src="../js/immersed.js" ></script>
	<script>
		function showActionSheet(conf){
          var divid = conf.id;  
//            var actionbuttons=[{title:"拍照"},{title:"相册选取"}];  
              var actionbuttons=[{title:"拍照"}]; 
              var actionstyle={title:"选择照片",cancel:"取消",buttons:actionbuttons};  
              plus.nativeUI.actionSheet(actionstyle, function(e){  
                    if(e.index==1){  
                        appendByCamera(divid)
                    }else if(e.index==2){  
                        appendByGallery(divid)
                    }  
              } );
        }

	</script>
</html>
